{% trans_default_domain 'FOSUserBundle' %}

<div class="row">

    <div class="col-sm-4 col-sm-offset-4 form-box">

        {{ form_start(form, {'method': 'post', 'action': path('fos_user_registration_register'), 'attr': {'class': 'fos_user_registration_register'}}) }}

            <div class="form-group">
                <label>登陆账号</label>
                {{ form_errors(form.username) }}
                {{ form_widget(form.username, { 'attr': { 'class': 'form-control', 'placeholder': '' } }) }}
            </div>

            <div class="form-group">
                <label>Email</label>
                {{ form_errors(form.email) }}
                {{ form_widget(form.email, { 'attr': { 'class': 'form-control', 'placeholder': '' } }) }}
            </div>

            <div class="form-group">
                <label>密码</label>
                {{ form_errors(form.plainPassword.first) }}
                {{ form_widget(form.plainPassword.first, { 'attr': { 'class': 'form-control', 'placeholder': '' } }) }}
            </div>

            <div class="form-group">
                <label>确认密码</label>
                {{ form_widget(form.plainPassword.second, { 'attr': { 'class': 'form-control', 'placeholder': '' } }) }}
            </div>

            <div>
                <input class="btn btn-success" type="submit" value="{{ 'registration.submit'|trans }}" />
                <a href="/login">
                    <button type="button" class="btn btn-default">回到登陆</button>
                </a>
            </div>
        {{ form_end(form) }}
    </div>
</div>
